import axios from "../index.js";
// 新增预警通知单
export const saveAdd = (data) => {
  return axios.request({
    url: "/warning/warningNotification/save",
    method: "post",
    data: data
  });
};
// 分页查询
export const listPage = (data) => {
  return axios.request({
    url: "/warning/warningNotification/listPage",
    method: "post",
    data: data
  });
};
// 删除
export const deleteById = (data) => {
  return axios.request({
    url: "/warning/warningNotification/deleteById",
    method: "post",
    data: data
  });
};
// 保存
export const warningNotificationSave = (data) => {
  return axios.request({
    url: "/warning/warningNotification/save",
    method: "post",
    data: data
  });
};
// 提交
export const warningNotificationSubmit = (data) => {
  return axios.request({
    url: "/warning/warningNotification/submit",
    method: "post",
    data: data
  });
};
// 修改
export const warningNotificationUpdById = (data) => {
  return axios.request({
    url: "/warning/warningNotification/updById",
    method: "post",
    data: data
  });
};// 审核
export const warningNotificationApprove = (data) => {
  return axios.request({
    url: "/warning/warningNotification/approve",
    method: "post",
    data: data
  });
};
// 详情
export const detailList = (data) => {
  return axios.request({
    url: "/warning/warningNotification/getById",
    method: "get",
    data: data
  });
};
// 获取下拉框研判单数据
export const getAlreadyIssueJudge = (data) => {
  return axios.request({
    url: "/warning/warningNotification/getAlreadyIssueJudge",
    method: "get",
    data: data
  });
};
// 获取下拉框研判单详情数据
export const getIssueJudgeData = (data) => {
  return axios.request({
    url: "/warning/warningNotification/getIssueJudgeData",
    method: "get",
    data: data
  });
};
// 调整接口
export const adjust = (data) => {
  return axios.request({
    url: "/warning/warningNotification/adjust",
    method: "post",
    data: data
  });
};
// 调整提交接口
export const adjustSubmit = (data) => {
  return axios.request({
    url: "/warning/warningNotification/adjustSubmit",
    // url: "/warning/warningNotification/Submit",
    method: "post",
    data: data
  });
};
// 解除接口
export const relieve = (data) => {
  return axios.request({
    url: "/warning/warningNotification/relieve",
    method: "post",
    data: data
  });
};
// 组织机构查询
export const getOrganizationList = (data) => {
  return axios.request({
    url: "/warning/organization/getOrganizationList",
    method: "get",
    data: data
  });
};
// 联系人
export const getTestUserList = (data) => {
  return axios.request({
    url: "/system/account/getAccountOrgInfoList",
    // url: "/warning/organization/getTestUserList",
    method: "get",
    data: data
  });
};

// 详情流程
export const getOperationLog = (data) => {
  return axios.request({
    url: "/warning/warningNotification/getOperationLog",
    method: "get",
    data: data
  });
};
// 时间轴应急事件
export const getFlowList = (data) => {
  return axios.request({
    url: "/emergency/warningFlow/getFlowList",
    method: "get",
    data: data
  });
};
// 首页图表
export const getStatistics = (data) => {
  return axios.request({
    url: "/warning/noticeHomePage/getStatistics",
    method: "get",
    data: data
  });
};
// 地图
export const getNoticeByLevel = (data) => {
  return axios.request({
    url: "/warning/noticeHomePage/getNoticeByLevel",
    method: "get",
    data: data
  });
};
// 新增 获取联系人
export const getPersonApi = (data) => {
  return axios.request({
    // url: "/brac/orgAccount/getAccountOrgInfoList",
    url: "/system/account/getAccountOrgList",
    method: "get",
    data: data
  });
};
// 地图
export const warningNotificationSelectwarningStatistics = (data) => {
  return axios.request({
    url: "/warning/warningNotification/selectwarningStatistics",
    method: "get",
    data: data
  });
};
// 调整 驳回
export const warningNotificationAdjustApprove = (data) => {
  return axios.request({
    url: "/warning/warningNotification/adjustApprove",
    method: "post",
    data: data
  });
};
// 责任单位及部门
export const sameLeveltree = (data) => {
  return axios.request({
    url: "/system/organization/getSameLevel",
    method: "get",
    data: data
  });
};


// 【树结构】获取某个单位下面的所有单位
export const getSubclassUntilList = (data) => {
  return axios.request({
    url: "/system/organization/getUnitAndNextUnit",
    method: "get",
    data: data
  });
};
// 获取特定组织机构单位下面的机构集合
export const getOrgDepartmentList = (data) => {
  return axios.request({
    url: "/system/organization/getOrgSameLevelDept",
    method: "get",
    data: data
  });
};
// 预览下载
export const doDownPdf = (data) => {
  return axios.request({
    url: "/warning/pdfWarnFile/doDownPdf",
    method: "get",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 组织机构列表  -- 准入单位
export const getSubclassUntilLists = (data) => {
  return axios.request({
    url: "/system/organization/getSubclassUntilList",
    method: "get",
    data: data
  });
};
// 预警通知单反馈
export const doNewPageList = (data) => {
  return axios.request({
    url: "/docking/warningNotificationConnectFeedBack/doNewPageList",
    method: "post",
    data: data
  });
};
// 预警通知单反馈详情
export const doGetById = (data) => {
  return axios.request({
    url: "/docking/warningNotificationConnectFeedBack/doGetById",
    method: "get",
    data: data
  });
};
